home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: bitfields, how big can their elements be?
- Date: 16 Mar 1996 07:15:06 +1300
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Message-ID: <4icc3a$g9i@airdmhor.gen.nz>
- References: <4i2lab$ili@hobbes.cc.uga.edu> <TANMOY.96Mar12075107@qcd.lanl.gov> <4i4c8dINNsde@keats.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- Kazimir Kylheku:
- > With GCC I tried making bitfields "long" and "short". This is an odd locution;
- > the compiler will actually prevent a "short" field from being more than 16
- > bits, but long can be 32. It's strange that the GNU compiler allows these
- > modifiers for bitfields! I'm going to have to look this up in the standard the
- > first chance I get.
-
- I'm fairly certain that they're supposed to be limited to
- (CHAR_BIT * sizeof(int)) bits. and they can't cross int boundaries.
-